/*{{page.name}}Ctrl.js*/
(function() {
    'use strict';
    angular.module('app').controller('{{page.name}}Ctrl', ['$scope', '$filter', '$rootScope', '$http', '$stateParams', '$state', 'OperationService', 'conowModals', 'activitiService','{{entitySubName}}Service',
    function($scope, $filter, $rootScope, $http, $stateParams, $state, OperationService, conowModals, activitiService,{{entitySubName}}Service) {
        var vm = $scope.vm = {};
        //获取id
        vm.dataId =  $stateParams.ID;
        //初始化
        var init = function () {
            {{entitySubName}}Service.queryById(vm.dataId).success(function (data) {
                if(data.success){
                    vm.data = data.obj;
                }
            })
        };

        init();

        {% if hasWorkflow %}
        vm.beforeSubmit = function(){
            return true;
        }
        {% endif %}
    }]);
})();